package com.ctshk.rpc.order.scenic.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.ctshk.common.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 景点门票订单
 * </p>
 *
 * @author 张志朋
 * @since 2021-02-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "t_scenic_order",autoResultMap = true)
@ApiModel(value="ScenicOrder对象", description="景点门票订单")
public class ScenicOrder extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "景点产品id")
    private Long productId;

    @ApiModelProperty(value = "景点产品门票id,多个逗号分隔")
    private String productTicketsId;

    @ApiModelProperty(value = "是否代理下单")
    private Integer isAgent;

    /*@ApiModelProperty(value = "旅客id,关联t_,多个逗号分隔")
    private String passengerId;*/

    @ApiModelProperty(value = "代理公司id")
    private Long agencyId;

    @ApiModelProperty(value = "代理公司")
    private String agencyCompany;

    @ApiModelProperty(value = "代理人名称")
    private String agentUserName;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "优惠券代码")
    private String couponCode;

    @ApiModelProperty(value = "优惠券抵扣金额")
    private BigDecimal couponDeduction;

    @ApiModelProperty(value = "会员积分抵扣(100积分抵扣1元人民币,需换算)")
    private BigDecimal integralDeduction;

    @ApiModelProperty(value = "星赏会会员ID")
    private String memberId;

    @ApiModelProperty(value = "积分")
    private Integer integral;

    @ApiModelProperty(value = "门票总额")
    private BigDecimal ticketsFee;

    @ApiModelProperty(value = "服务费(单服务费*门票数)")
    private BigDecimal serviceFee;

    @ApiModelProperty(value = "订单总额")
    private BigDecimal orderAmount;

    @ApiModelProperty(value = "销售单号")
    private String orderNumber;

    @ApiModelProperty(value = "付款状态")
    private Integer paymentStatus;

    @ApiModelProperty(value = "预订状态")
    private Integer scheduledStatus;

    //修改时不判断空
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "取消状态")
    private Integer cancelStatus;

    @ApiModelProperty(value = "产品类型")
    private Integer productType;

    @ApiModelProperty(value = "来源")
    private Integer source;

    @ApiModelProperty(value = "付款到期时间")
    private LocalDateTime payExpireDate;

    @ApiModelProperty(value = "应收金额")
    private BigDecimal receivableAmount;

    @ApiModelProperty(value = "下单类型(1:散客;2:代理下单;3:大客户)")
    private Integer orderType;

    @ApiModelProperty(value = "已退款金额")
    private BigDecimal refundedAmount;

    @ApiModelProperty(value = "销售方式(1：单品销售 2：打包销售)")
    private Integer salesMethods;

    @ApiModelProperty(value = "创建人")
    private Long createId;

    @ApiModelProperty(value = "修改人")
    private Long modifiedId;

    @ApiModelProperty(value = "删除标识")
    private Integer isDeleted;

    @ApiModelProperty(value = "销售人员id")
    private Long salesmanId;

    @ApiModelProperty(value = "销售人员名称")
    private String salesmanName;

    @ApiModelProperty(value = "联系人姓")
    private String surname;

    @ApiModelProperty(value = "联系人名")
    private String name;

    @ApiModelProperty(value = "联系人姓名")
    private String contactName;

    @ApiModelProperty(value = "称谓")
    private Integer appellation;

    @ApiModelProperty(value = "联系人手机")
    private String contactMobile;

    @ApiModelProperty(value = "联系人手机区号id")
    private Long contactMobileAreaCodeId;

    @ApiModelProperty(value = "联系人手机区号")
    private String contactMobileAreaCode;

    @ApiModelProperty(value = "联系人邮箱")
    private String contactEmail;

    @TableField(typeHandler = FastjsonTypeHandler.class)
    @ApiModelProperty(value = "文件Json")
    private String fileJson;

    @ApiModelProperty(value = "查询单号")
    private String queryNumber;

    @ApiModelProperty(value = "注意事项")
    private String note;

    @ApiModelProperty(value = "门票数量")
    private Integer productTicketNumber;

    @ApiModelProperty(value = "单张门票价格")
    private BigDecimal singleTicketFee;

    @ApiModelProperty(value = "取消原因")
    private String refundReason;

    @ApiModelProperty(value = "C端下单用户id")
    private Long userId;
}
